﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Green.AgileMapper
{
    public interface IObjectMapper : ICodeGenerator
    {       

        /// <summary>
        /// 根据to得到from
        /// </summary>
        /// <param name="FromType"></param>
        /// <param name="to"></param>
        /// <returns></returns>
        object Warp(Type FromType, object to);
        /// <summary>
        /// 根据from包装to
        /// </summary>
        /// <param name="toType"></param>
        /// <param name="from"></param>
        /// <param name="to"></param>
        void Warp(Type toType, object from, object to);
        /// <summary>
        /// 根据from得到to，必须都是对象，非空
        /// </summary>
        /// <param name="from"></param>
        /// <param name="to"></param>
        void Warp(object from, object to);
      
    }
}
